<?php
/**
 * Created by PhpStorm.
 * User: 10037
 * Date: 2022/5/29
 * Time: 19:58
 */

namespace app\admin\controller;


use app\admin\model\Business;
use app\admin\model\City;
use app\admin\model\Foods;
use app\admin\model\Order;
use app\admin\model\User;

class UserImage
{
    public function selectProvince(){
        $mode=new City();
        return $mode->selectProvince();
    }

    public function selectAllCount(){
        $busMode=new Business();
        $busCount=$busMode->selectAllBusCount();
        $orderMode=new Order();
        $orderCount=$orderMode->selectCount();
        $userMode=new User();
        $userCount=$userMode->selectUserCount();
        $foodMode=new Foods();
        $foodCount=$foodMode->where('delete','=',0)->count();

        return json([
            'busCount'=>$busCount,
            'orderCount'=>$orderCount,
            'userCount'=>$userCount,
            'foodCount'=>$foodCount
        ]);
    }
}